package com.waitingresult.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.waitingresult.demo.annotation.Log;
import com.waitingresult.demo.entity.User;
import com.waitingresult.demo.enums.MysqlModeEnums;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import static com.waitingresult.demo.cons.RedisCacheKeyCons.USER_LOG_CACHE_KEY;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Log(table = "user", clazz = User.class,mysqlMode = MysqlModeEnums.UPDATE,redisKey = USER_LOG_CACHE_KEY)
    Boolean updateByEntity(@Param("user")User user);
}